<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>保险记录管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            //$("#name").focus();
            $("#inputForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
    </script>
</head>
<body>
<!--
<ul class="nav nav-tabs">
	<li><a href="${ctx}/elmt/wbInsuranceRecord/">保险记录列表</a></li>
	<li class="active"><a href="${ctx}/elmt/wbInsuranceRecord/form?id=${wbInsuranceRecord.id}">保险记录<shiro:hasPermission name="elmt:wbInsuranceRecord:edit">${not empty wbInsuranceRecord.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="elmt:wbInsuranceRecord:edit">查看</shiro:lacksPermission></a></li>
</ul>
<br/>
-->
<form:form id="inputForm" modelAttribute="wbInsuranceRecord" action="${ctx}/elmt/wbInsuranceRecord/save" method="post" class="form-horizontal">
    <form:hidden path="id"/>
    <sys:message content="${message}"/>
    <div class="container-fluid">

        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">保险公司：</label>

                <div class="col-sm-4">
                    <form:input path="insuranceOrg" htmlEscape="false" maxlength="100" class="form-control input-sm required"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">理赔电话：</label>

                <div class="col-sm-4">
                    <form:input path="insuranceTel" htmlEscape="false" maxlength="100" class="form-control input-sm"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">保险期限：</label>

                <div class="col-sm-4">
                    <input name="insuranceDate" type="text" readonly="readonly" maxlength="20" class="form-control input-sm Wdate "
                           value="<fmt:formatDate value="${wbInsuranceRecord.insuranceDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                           onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">保险单号：</label>

                <div class="col-sm-4">
                    <form:input path="insuranceNo" htmlEscape="false" maxlength="100" class="form-control input-sm"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">备注：</label>

                <div class="col-sm-4">
                    <form:textarea path="remark" htmlEscape="false" rows="4" maxlength="1000" class="form-control input-sm"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="form-group">
                <label class="col-sm-2 control-label">设备注册代码：</label>

                <div class="col-sm-4">
                    <form:input path="sbzcdm" htmlEscape="false" maxlength="100" class="form-control input-sm"/>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-4">
                    <shiro:hasPermission name="elmt:wbInsuranceRecord:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
                    <input id="btnCancel" class="btn btn-primary" type="button" value="返 回" onclick="history.go(-1)"/>
                </div>
            </div>
        </div>
    </div>
</form:form>
</body>
</html>